package cn.schoolwow.quickdao.module.database.dml.instance.service.save;

import cn.schoolwow.quickdao.module.database.dml.instance.flow.common.SetInstanceEntityFlow;
import cn.schoolwow.quickdao.module.database.dml.instance.flow.insert.get.DistinguishExistInstanceFlow;
import cn.schoolwow.quickdao.module.database.dml.instance.flow.save.SaveInstanceArrayFlow;
import cn.schoolwow.quickflow.QuickFlowExecutor;
import cn.schoolwow.quickflow.flow.CompositeBusinessFlow;

public class SaveInstanceArrayCompositeBusiness implements CompositeBusinessFlow {
    @Override
    public void executeCompositeBusiness(QuickFlowExecutor quickFlowExecutor) {
        quickFlowExecutor.next(new SetInstanceEntityFlow())
                .next(new DistinguishExistInstanceFlow())
                .next(new SaveInstanceArrayFlow());
    }

    @Override
    public String name() {
        return "保存实例数组复合流程";
    }
}
